<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Conf\ConfModel;

use Srv\Libs\ConfModel\ConfAbstract;

final class JPushConf extends ConfAbstract
{
    public const PREFIX                         = 'JPUSH.';             // 配置前缀[必定点结尾]
    protected string $appKey                    = '';                   // 应用Key
    protected string $secret                    = '';                   // 秘钥Key
    protected string $logPath                   = '';                   // 日志路径
    protected int $ios                          = 0;                    // 苹果推送[0-不推送,1-生产,2-开发,3-生产+开发]
    protected int $android                      = 0;                    // 安卓推送[0-不推送,1-推送]
    protected string $androidUriActivity        = '';                   // 安卓通道[华为/小米][com.exp.app.PushClickActivity]
    protected string $androidUriAction          = '';                   // 安卓通道[OPPO/FCM][com.exp.app.PushClickActivity]

    /**
     * @param array $confData
     */
    public function __construct(array $confData)
    {
        $this->init($confData);
    }

    /**
     * @return string
     */
    public function getAppKey(): string
    {
        return $this->appKey;
    }

    /**
     * @return string
     */
    public function getSecret(): string
    {
        return $this->secret;
    }

    /**
     * @return string
     */
    public function getLogPath(): string
    {
        return $this->logPath;
    }

    /**
     * @return int
     */
    public function getIos(): int
    {
        return $this->ios;
    }

    /**
     * @return int
     */
    public function getAndroid(): int
    {
        return $this->android;
    }

    /**
     * @return string
     */
    public function getAndroidUriActivity(): string
    {
        return $this->androidUriActivity;
    }

    /**
     * @return string
     */
    public function getAndroidUriAction(): string
    {
        return $this->androidUriAction;
    }
}